package com.example.day09;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

public class Vp_Frag extends FragmentPagerAdapter {
    List<Fragment>frg;

    public Vp_Frag(@NonNull FragmentManager fm, List<Fragment> frg) {
        super(fm);
        this.frg = frg;
    }

    public Vp_Frag(@NonNull FragmentManager fm) {
        super(fm);
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return frg.get(position);
    }

    @Override
    public int getCount() {
        return frg.size();
    }
}
